<?php // no direct access
/* 
Module latest news for joomla 1.5
Slice effect by Jquery
Develope by Tranquang
At Vinazoom co., Ltd
website:  www.vinazoom.com
License GNU/GPL
*/
defined('_JEXEC') or die('Restricted access'); ?>
<?php 
$next=JURI::base().'modules/mod_vnz_latestnews_slice/css/next.jpg';
		
?>

<script type="text/javascript">
$(document).ready(function(){
	$("#myController").jFlow({
		slides: "#slides",
		controller: ".jFlowControl", // must be class, use . sign
		slideWrapper : "#jFlowSlide", // must be id, use # sign
		selectedWrapper: "jFlowSelected",  // just pure text, no sign
		auto: true,		//auto change slide, default true
		width: "<?php echo $w_slice;?>px",
		height: "<?php echo $h_slice;?>px",
		duration: <?php echo $duration; ?>,
		prev: ".jFlowPrev", // must be class, use . sign
		next: ".jFlowNext" // must be class, use . sign
	});
});

</script>
<script type="text/javascript">
	function addLoadEvent(func) { if (typeof window.onload != 'function') { window.onload = func; } else { var oldonload = window.onload; window.onload = function() { if (oldonload) { oldonload(); } func(); } } }
	addLoadEvent(function()	{
		FN_ContentSlider('fn_slider',8000,'<img src="<?php echo $next;?>">');
	
	});
</script>
<div class="fn_pagination" id="paginate-fn_slider">
<a class="selected" href="#" onclick="FN_ContentSlider.turnpage('fn_slider', 0); return false">1</a>
 <a class="" href="#" onclick="FN_ContentSlider.turnpage('fn_slider', 1); return false">2</a> 
 <a class="" href="#" onclick="FN_ContentSlider.turnpage('fn_slider', 2); return false">3</a> 
 <a class="" href="#" onclick="FN_ContentSlider.turnpage('fn_slider', 3); return false">4</a> 
 <a class="" href="#" onclick="FN_ContentSlider.turnpage('fn_slider', 4); return false">5</a>
 <a rel="1" href="#" style="font-weight: bold;" onclick="FN_ContentSlider.turnpage('fn_slider', parseInt(this.getAttribute('rel'))); return false"><img src="<?php echo $next; ?>"></a>
 </div>

<div id="fn_slider" class="fn_slider" style="height:<?php echo $h_slice; ?>px;">
	<div style="opacity: 1.1;" class="opacitylayer">
		<?php  $i=0; foreach ($list as $item) :  ?>
        <div style="display: none;" class="fn_news">
			<p>		
			<?php if ($item->img){ 
				
			?>
					<img src="<?php echo $item->img; ?>" width="<?php echo $w_image; ?>" height="<?php echo $h_image; ?>" alt="photo" align="left" class="img1"/>
			<?php } ?>	
			
					<a href="<?php echo $item->link; ?>" class="latestnewstq<?php echo $params->get('moduleclass_sfx'); ?>"><?php echo $item->text; ?><br /></a>
					<?php
						$intro_text= strip_tags($item->intro); 
						$intro_text=substr($intro_text,0,500);
						echo$intro_text;
					?>
					
			</p>
		</div>
       <?php  $i++;  endforeach; ?>

    </div>
</div>


<div id="vnz-dep"><a href="http://www.vinazoom.com" title="Vinazoom"> Developed by Vinazoom </a></div>